package net.oschina.archx.spring.sequoiadb.annotation;

import com.sequoiadb.exception.BaseException;

import java.lang.annotation.*;

/**
 * 巨杉数据库事务注解
 *
 * @author Archx
 */
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Inherited
public @interface SequoiaTransaction {

    /**
     * 需要回滚的异常
     *
     * @return
     */
    Class<? extends Throwable>[] rollbackFor() default {BaseException.class};
}
